package org.kinglone.back.user.model;

import java.util.ArrayList;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="t_user")
public class WeixinUser {
	private Integer id;
	private String openid;
	private String nickname;
	private int sex;
	private String language;
	private String city;
	private String province;
	private String country;
	private String headimgurl;
	private ArrayList<String> privilege;
	
	public WeixinUser() {
	}
	public WeixinUser(Integer id, String openid, String nickname, int sex,
			String language, String city, String province, String country,
			String headimgurl, ArrayList<String> privilege) {
		super();
		this.id = id;
		this.openid = openid;
		this.nickname = nickname;
		this.sex = sex;
		this.language = language;
		this.city = city;
		this.province = province;
		this.country = country;
		this.headimgurl = headimgurl;
		this.privilege = privilege;
	}
	@Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getOpenid() {
		return openid;
	}
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public int getSex() {
		return sex;
	}
	public void setSex(int sex) {
		this.sex = sex;
	}
	public String getLanguage() {
		return language;
	}
	public void setLanguage(String language) {
		this.language = language;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	public String getHeadimgurl() {
		return headimgurl;
	}
	public void setHeadimgurl(String headimgurl) {
		this.headimgurl = headimgurl;
	}
	public ArrayList<String> getPrivilege() {
		return privilege;
	}
	public void setPrivilege(ArrayList<String> privilege) {
		this.privilege = privilege;
	}
	@Override
	public String toString() {
		return "WeixinUser [id=" + id + ", openid=" + openid + ", nickname="
				+ nickname + ", sex=" + sex + ", language=" + language
				+ ", city=" + city + ", province=" + province + ", country="
				+ country + ", headimgurl=" + headimgurl + ", privilege="
				+ privilege + "]";
	}
	
	
}
